<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #box{
            margin: 20px auto;
        }
        input {
            background-color: #ccc;
            border: none;
            outline: none;
            width: 200px;
            height: 30px;
            line-height: 30px;
            border-radius: 15px;
            padding-left: 15px;

        }
        .searchbox span{
            display: inline-block;
            height: 30px;
            line-height: 30px;
            font-size: 14px;
            color: skyblue;
        }
        .block{
            margin-top: 20px;
            
        }
        .block .title{
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 10px;
            display: inline-block;
        }
        .list li{
            display: inline-block;
            height: 30px;
            line-height: 30px;
            background-color: #ccc;
            border-radius: 15px;
            font-size: 15px;
            padding: 0 10px;
            margin-right: 5px;
        }
        .del{
            margin-left: 100px;
        }
    </style>
</head>
<body>
    <div id="box">
        <div class="searchbox">
            <input type="text" v-model="text" placeholder="搜索商家 商品名称">
            <span @click="search()">搜索</span>

        </div>
        <div class="block">
            <div class="title">历史搜索</div><button class="del" @click="del(index)">Del</button>
            <div class="list">
                <ul>
                    <li v-for="(item,index) in searchArr">{{item}}</li>
                </ul>
            </div>
        </div>
    </div>
    <script src="./vue-2.5.21.js"></script>
    <script src="./index-输入框的绑定.js"></script>
</body>
</html>